home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 23 / CU Amiga - Super CD-ROM 23 (June 1998).iso / CreatingGames / Utilities / C / Mesa / widgets-mesa / include / GL / MesaWorkstationP.h < prev   
Encoding:
C/C++ Source or Header  |  1997-01-31  |  3.1 KB  |  143 lines

  1. /* MesaWorkstationP.h -- Private header file for the Mesa Workstation widget
  2.    Copyright (C) 1995 Thorsten.Ohl @ Physik.TH-Darmstadt.de
  3.  
  4.    This library is free software; you can redistribute it and/or
  5.    modify it under the terms of the GNU Library General Public
  6.    License as published by the Free Software Foundation; either
  7.    version 2 of the License, or (at your option) any later version.
  8.  
  9.    This library is distributed in the hope that it will be useful,
  10.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.    GNU Library General Public License for more details.
  13.  
  14.    You should have received a copy of the GNU Library General Public
  15.    License along with this library; if not, write to the Free Software
  16.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  17.  
  18.    $Id: MesaWorkstationP.h,v 1.9 1996/01/15 00:44:08 ohl Exp $
  19.  */
  20.  
  21. #ifndef _MesaWorkstationP_h
  22. #define _MesaWorkstationP_h
  23.  
  24. #include <GL/MesaDrawingAreaP.h>
  25. #include <GL/MesaWorkstation.h>
  26.  
  27. typedef enum { NOPROJ, PROJ_MATRIX, PROJ_LIST, FRUSTUM, ORTHO } projtype;
  28.  
  29. typedef    struct
  30. {
  31.   GLdouble left, right;
  32.   GLdouble bottom, top;
  33.   GLdouble near, far;
  34. }
  35. volume;
  36.   
  37. typedef struct
  38. {
  39.   projtype type;
  40.   GLuint list;
  41.   union
  42.     {
  43.       GLdouble m[16];
  44.       volume vol;
  45.     }
  46.   u;
  47. }
  48. projection;
  49.  
  50. typedef enum { NOVIEW, VIEW_MATRIX, VIEW_LIST, LOOK_AT, POLAR } viewtype;
  51.  
  52. typedef    struct
  53. {
  54.   GLdouble eyex, eyey, eyez;
  55.   GLdouble ctrx, ctry, ctrz;
  56.   GLdouble upx, upy, upz;
  57. }
  58. look_at;
  59.   
  60. typedef    struct
  61. {
  62.   GLdouble r;
  63.   GLdouble theta;
  64.   GLdouble phi;
  65. }
  66. polar;
  67.  
  68. typedef struct
  69. {
  70.   viewtype type;
  71.   GLuint list;
  72.   union
  73.     {
  74.       GLdouble m[16];
  75.       look_at look_at;
  76.       polar polar;
  77.     }
  78.   u;
  79. }
  80. view;
  81.  
  82. typedef struct
  83.   {
  84.     char *RCS_Id;
  85.   }
  86. MesaWorkstationClassPart;
  87.  
  88. #ifdef __GLX_MOTIF
  89. typedef struct _MesaMWorkstationClassRec
  90.   {
  91.     CoreClassPart core_class;
  92.     XmPrimitiveClassPart primitive_class;
  93.     GLwDrawingAreaClassPart glwDrawingArea_class;
  94.     MesaDrawingAreaClassPart mesaDrawingArea_class;
  95.     MesaWorkstationClassPart mesaWorkstation_class;
  96.   }
  97. MesaMWorkstationClassRec;
  98. extern MesaMWorkstationClassRec mesaMWorkstationClassRec;
  99. #else
  100. typedef struct _MesaWorkstationClassRec
  101.   {
  102.     CoreClassPart core_class;
  103.     GLwDrawingAreaClassPart glwDrawingArea_class;
  104.     MesaDrawingAreaClassPart mesaDrawingArea_class;
  105.     MesaWorkstationClassPart mesaWorkstation_class;
  106.   }
  107. MesaWorkstationClassRec;
  108. extern MesaWorkstationClassRec mesaWorkstationClassRec;
  109. #endif
  110.  
  111. typedef struct
  112.   {
  113.     projection projection;
  114.     view view;
  115.     GLuint *objects;
  116.     GLuint *next_object;
  117.     size_t allocated_objects;
  118.   }
  119. MesaWorkstationPart;
  120.  
  121. #ifdef __GLX_MOTIF
  122. typedef struct _MesaMWorkstationRec
  123.   {
  124.     CorePart core;
  125.     XmPrimitivePart primitive;
  126.     GLwDrawingAreaPart glwDrawingArea;
  127.     MesaDrawingAreaPart mesaDrawingArea;
  128.     MesaWorkstationPart mesaWorkstation;
  129.   }
  130. MesaMWorkstationRec;
  131. #else
  132. typedef struct _MesaWorkstationRec
  133.   {
  134.     CorePart core;
  135.     GLwDrawingAreaPart glwDrawingArea;
  136.     MesaDrawingAreaPart mesaDrawingArea;
  137.     MesaWorkstationPart mesaWorkstation;
  138.   }
  139. MesaWorkstationRec;
  140. #endif
  141.  
  142. #endif /* _MesaWorkstationP_h */
  143.